import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

  const routes = [
  {
     path: '/', redirect: { name: 'Home' }
  },
  {
    path: '/Home',
    name: 'Home',
    component: Home
  },
  {
    path: '/d1',
    name:'d1',
    component: () => import(/* webpackChunkName: "about" */ '../views/d1/d1.vue'),
    children: [
      {
        path: 'quality',
        name: 'quality',
        component: () => import(/* webpackChunkName: "about" */ '../views/d1/quality.vue')
      },
      {
        path: 'profile',
        name: 'profile',
        component: () => import(/* webpackChunkName: "about" */ '../views/d1/profile.vue')
      },
      {
        path: 'story',
        name: 'story',
        component: () => import(/* webpackChunkName: "about" */ '../views/d1/story.vue')
      },
      {
        path: 'tour',
        name: 'tour',
        component: () => import(/* webpackChunkName: "about" */ '../views/d1/tour.vue')
      }
    ]
  },
  {
    path: '/d2',
    name:'d2',
    component: () => import(/* webpackChunkName: "about" */ '../views/d2/d2.vue'),
    children:[
      {
        path: 'pottery',
        name: 'pottery',
        component: () => import(/* webpackChunkName: "about" */ '../views/d2/pottery.vue')
      },
      {
        path: 'greatmaster',
        name: 'greatmaster',
        component: () => import(/* webpackChunkName: "about" */ '../views/d2/greatmaster.vue')
      },
      {
        path: 'global',
        name: 'global',
        component: () => import(/* webpackChunkName: "about" */ '../views/d2/global.vue')
      },
      {
        path: 'sharewinecabinet',
        name: 'sharewinecabinet',
        component: () => import(/* webpackChunkName: "about" */ '../views/d2/sharewinecabinet.vue')
      },
    ]
  },
  {
    path: '/d3',
    name:'d3',
    component: () => import(/* webpackChunkName: "about" */ '../views/d3/d3.vue'),
  },
  {
    path: '/d4',
    name:'d4',
    component: () => import(/* webpackChunkName: "about" */ '../views/d4/d4.vue'),
  },
  {
    path: '/d5',
    name:'d5',
    component: () => import(/* webpackChunkName: "about" */ '../views/d5/d5.vue'),
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
